package com.stars.module.log.entity;

/**
 * @author : Rocks
 * @version : 1.0
 * @date : 2022/11/16 10:19
 * @description : 日志类型枚举
 */
public enum LogEnum {

    LOGIN("100","登录");

    private final String type;
    private final String typeText;

    LogEnum(String type, String typeText) {
        this.type = type;
        this.typeText = typeText;
    }

    public static String getText(String type) {
        LogEnum[] logEnums = values();
        for (LogEnum logEnum : logEnums) {
            if (logEnum.type().equals(type)) {
                return logEnum.text();
            }
        }
        return null;
    }

    public String type(){
        return this.type;
    }

    public String text(){
        return  this.typeText;
    }

}
